<template>
  <view>
    <up-navbar
      :title="title"
      @leftClick="leftClick"
      @rightClick="rightClick"
      :autoBack="true"
      :placeholder="true"
      :leftIconSize="leftIconSize"
    >
    </up-navbar>
  </view>
</template>

<script setup>
import { ref, onMounted } from "vue";

// 定义组件属性
const props = defineProps({
  title: {
    type: String,
    default: "标题",
  },
  leftIconSize: {
    type: Number,
    default: 20,
  },
});

// 定义方法
const rightClick = () => {
  console.log("rightClick");
};

const leftClick = () => {
  console.log("leftClick");
};

// 返回方法
// function leftClick() {
//   var pages = getCurrentPages();
//   if (pages && pages.length > 1) {
//     console.log("99999");
//     uni.navigateBack();
//   } else {
//     uni.reLaunch({
//       url: "/pages/tabbar/index/index",
//     });
//   }
// }
</script>

<style lang="scss" scoped></style>
